/*
 * @file    :drv_timer.h
 * @author  :LingFengLu
 * @date    :2023-06-06
 */

#ifndef _DRV_TIMER_H_
#define _DRV_TIMER_H_
#include "global.h"
#include <stdbool.h>
#include "rf_driver_hal_vtimer.h"
#include "ble_const.h" 
#include "bluenrg_lp_stack.h"
#include "OTA_btl.h" 
#include "gatt_db.h"
//Constant definition    宏定义
typedef enum
{
    DRV_TIMER_PARAM_SWITCH = 0,
    DRV_TIMER_PARAM_PERIOD,
    DRV_TIMER_PARAM_CALLBACK,
    DRV_TIMER_PARAM_REPEAT,
		DRV_TIMER_PARAM_TIMEOUTFLAG,
    DRV_TIMER_PARAM_COUNT
}drv_timer_param;

typedef enum
{
    DRV_TIMER_ID0 = 0,
    DRV_TIMER_ID1,
    DRV_TIMER_ID2,
    DRV_TIMER_ID3,
    DRV_TIMER_ID4,
    DRV_TIMER_COUNT
}drv_timer_id;
typedef void(* fp_timer_callback) (void);
//Type definition    类型定义


//Function declaration    函数申明
void DrvTimer_Init(void);
uint DrvTimer_SetConfig
(
	uint ui_DeviceId,
    uint ui_Parameter,
	uint8 *u8p_Value,
	uint ui_Length
);

//Golbal variable declaration   全局变量申明



void DrvTimer_Start(uint ui_DeviceId ,uint32 timeout ,uint8 Repeat  ,VTIMER_CallbackType Callback) ;
void DrvTimer_Finsh(uint ui_DeviceId) ;
void DrvTimer_process(void) ;




#endif

